package com.woniu.repaircenter.models.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;

@Data
@ApiModel(value = "维修材料表单")
public class AddRepairMaterialForm {

    /**
     * 材料代码
     */
    @ApiModelProperty("材料代码")
    @NotNull(message = "材料代码不能为空")
    private String materialCode;

    /**
     * 维修编号
     */
    @ApiModelProperty("维修编号")
    @NotNull(message = "维修编号不能为空")
    @Size(min = 19, max = 19, message = "维修编号长度不能小于1")
    private String repairNum;

    /**
     * 数量
     */
    @ApiModelProperty("数量")
    @NotNull(message = "数量不能为空")
    @Positive(message = "数量必须大于0")
    private Integer count;
}
